package com.example.computertms.mapper;

import com.example.computertms.pojo.Users;
import org.apache.ibatis.annotations.*;

@Mapper
public interface UserMapper {

    @Select("select * from users where account=#{account}")
    Users findUserByAccount(@Param("account")String account);

    @Insert("insert into users (openid, account, password, userInfo) VALUE (#{openid},#{account},#{password},#{userInfo})")
    void addUser(@Param("openid")String openid, @Param("account")String account, @Param("password")String password,@Param("userInfo")String userInfo);

    @Update("update users set password=#{password} where account=#{account}")
    void changePassword(@Param("password") String password, @Param("account") String account);
}
